<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery.js"></script>
    <style>
        table {
            border-collapse: collapse;
            border-spacing: 0;
        }

        th,
        td {
            padding: 0;
        }
    </style>
</head>

<body>
    <table border="1">
        <thead>
            <tr>
                <th style="width: 50px;align-items: center;">序号</th>
                <th style="width: 150px;">更新时间</th>
                <th style="width: 100px;">城市名称</th>
                <th style="width: 100px;">实时天气情况</th>
                <th style="width: 100px;">实时温度</th>
            </tr>
        </thead>
        <tbody id="dataList">
        </tbody>
    </table>
</body>

</html>
<script>
    async function LoadData() {
        for (let index = 1; index <= 10; index++) {
            console.info(new Date().getSeconds());
            await sleep(1000);
            $.get('https://v0.yiketianqi.com/api?unescape=1&version=v61&appid=23035354&appsecret=8YvlPNrz', function (p) {
                $('#dataList').append('<tr><td>' + index + '</td><td>' + p.date + ' ' + p.update_time + '</td><td>' + p.city + '</td><td>' + p.wea + '</td><td>' + p.tem + '</td></tr>');
            });
        }
    }
    function sleep(millisecond) {
        return new Promise(resolve => {
            setTimeout(() => {
                resolve()
            }, millisecond)
        })
    }

    LoadData();
</script>